<!DOCTYPE html>
<html lang="en">
<head>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
</head>
<body>
    <div id="app">
        <my-com></my-com>
    </div>
    <script>
        var comElement =Vue.extend({
            template:'<h3>全局组件</h3><p>这是我们创建的全局组件</p>'
        })
        Vue.component('my-com',comElement)
        var app=new Vue({
            el:'#app'
        })
    </script>
</body>
</html>